<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/*
|--------------------------------------------------------------------------
| File and Directory Modes
|--------------------------------------------------------------------------
|
| These prefs are used when checking and setting modes when working
| with the file system.  The defaults are fine on servers with proper
| security, but you may wish (or even need) to change the values in
| certain environments (Apache running a separate process for each
| user, PHP under CGI with Apache suEXEC, etc.).  Octal values should
| always be used to set the mode correctly.
|
*/
define('FILE_READ_MODE', 0644);
define('FILE_WRITE_MODE', 0666);
define('DIR_READ_MODE', 0755);
define('DIR_WRITE_MODE', 0777);

/*
|--------------------------------------------------------------------------
| File Stream Modes
|--------------------------------------------------------------------------
|
| These modes are used when working with fopen()/popen()
|
*/

define('FOPEN_READ',							'rb');
define('FOPEN_READ_WRITE',						'r+b');
define('FOPEN_WRITE_CREATE_DESTRUCTIVE',		'wb'); // truncates existing file data, use with care
define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE',	'w+b'); // truncates existing file data, use with care
define('FOPEN_WRITE_CREATE',					'ab');
define('FOPEN_READ_WRITE_CREATE',				'a+b');
define('FOPEN_WRITE_CREATE_STRICT',				'xb');
define('FOPEN_READ_WRITE_CREATE_STRICT',		'x+b');


/* End of file constants.php */
/* Location: ./application/config/constants.php */

// Define Ajax Request
define('IS_AJAX', isset($_SERVER['HTTP_X_REQUESTED_WITH'])
&& strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest');

/* BEGIN: ADMIN */
define('SEARCH_TEXTBOX_MESSAGE', 'type searched keyword here ...');
define('CONTENT_BODY_TYPE_HEADER', 'header');
define('CONTENT_BODY_TYPE_ITEM', 'item');
define('CONTENT_BODY_TYPE_FOOTER', 'footer');

define('DATETIME_FORMAT_DB', "H:i:s");
define('DATETIME_FORMAT_DB_NO_TIME', "Y-m-d");
define('DATETIME_FORMAT_FULL', 'd/m/Y H:i:s');
define('DATETIME_FORMAT_HYPHEN', 'd-m-Y-h-i-s');

// TABLE
define('ADMIN_GROUP_TABLE', PREFIX.'admin_nqt_groups');
define('ADMIN_LOGS_TABLE', PREFIX.'admin_nqt_logs');
define('ADMIN_USER_TABLE', PREFIX.'admin_nqt_users');
define('ADMIN_MODULE_TABLE', PREFIX.'admin_nqt_modules');

define('ARTICLE_TABLE', PREFIX.'article');
define('PRODUCT_CATEGORY_TABLE', PREFIX.'product_category');
define('PRODUCT_TABLE', PREFIX.'product');
define('BANNNER_TABLE', PREFIX.'banner');
define('MAKER_TABLE', PREFIX.'maker');
define('CONTACT_TABLE', PREFIX.'contact');

/* END: ADMIN */

// DIR PATH
define('ARTICLE_IMAGE_PATH','static/uploads/article/image/');
define('BANNER_IMAGE_PATH','static/uploads/banner/image/');
define('MAKER_IMAGE_PATH','static/uploads/maker/image/');
define('PRODUCT_CATEGORY_IMAGE_PATH','static/uploads/product_category/image/');
define('PRODUCT_IMAGE_PATH','static/uploads/product/image/');

define('ARTICLE_TEMPLATE_STATIC_PAGE','');
define('ARTICLE_TEMPLATE_HOMEPAGE','template_homepage');
define('ARTICLE_TEMPLATE_LISTPAGE','template_listpage');
define('ARTICLE_TEMPLATE_KMPAGE','template_kmpage');
define('ARTICLE_TEMPLATE_CONTACT_PAGE','template_contact');
define('TEMPLATE_PRODUCT','template_product');
define('TEMPLATE_PRODUCT_CATEGORY','template_product_category');
define('TEMPLATE_PRODUCT_DETAIL','template_product_detail');
define('TEMPLATE_PRODUCT_BANNER','template_product_banner');
define('TEMPLATE_ARTICLE_BANNER','template_article_banner');

$ARTICLE_TEMPLATE_LIST = array(
	'ARTICLE_TEMPLATE_STATIC_PAGE' 	=> 'Static page',
	// 'ARTICLE_TEMPLATE_HOMEPAGE' 	=> 'Home_page',
	'ARTICLE_TEMPLATE_CONTACT' 	=> 'Contact_page',
	'ARTICLE_TEMPLATE_LISTPAGE' 	=> 'List_page',
	'PRODUCT_TEMPLATE_CATEGORYPAGE' => 'Category_page',
	'PRODUCT_TEMPLATE_DETAIL' 		=> 'Detail_page',
	'PRODUCT_TEMPLATE_STATIC'	 	=> 'Static_page',
);